<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head><title>My First Stripe</title></head>
  <body>
    <h1>Uživatelé</h1>

    <s:form beanclass="cz.studio.stripes.action.Mas101">
        <table border="1" width="100%">
        	<tr>
        		<th>Id</th>
        		<th>Jméno</th>
        		<th>Příjmení</th>
        		<th>Telefon</th>
        		<th>Email</th>
        		<th>Login</th>
        		<th>Role</th>
        		<th>Adresa</th>
        		<th></th>
        	</tr>
            <c:forEach items="${actionBean.uzivatele}" var="u">
            	<tr>
            		<td><c:out value="${u.id}"/></td>
            		<td><c:out value="${u.jmeno}"/></td>
            		<td><c:out value="${u.prijmeni}"/></td>
            		<td><c:out value="${u.telefon}"/></td>
            		<td><c:out value="${u.email}"/></td>
            		<td><c:out value="${u.login}"/></td>
            		<td><c:out value="${u.role}"/></td>
            		<td>
            			<c:out value="${u.adresa.ulice}"/>&nbsp;<c:out value="${u.adresa.cp}"/><br/>
            			<c:out value="${u.adresa.obec}"/>&nbsp;<c:out value="${u.adresa.psc}"/><br/>
            		</td>
            		<td>
            			<s:link event="edit" beanclass="cz.studio.stripes.action.Mas102">
            				<s:param name="idcko" value="${u.id}"/>Edit
            			</s:link>&nbsp;
            			<s:link event="delete" beanclass="cz.studio.stripes.action.Mas101">
            				<s:param name="id" value="${u.id}"/>Delete
            			</s:link>
            		</td>
            	</tr>
            </c:forEach>
        </table>
        <br/>
        <table width="100%">
        <tr><td align="center"><s:link event="novy" beanclass="cz.studio.stripes.action.Mas102">Nový uživatel</s:link></td></tr>
        </table>
    </s:form>
  </body>
</html>